package com.song.config;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author 刘庆东
 * @ClassName ContantsProperties
 * @description:  解析配置文件中自定义的配置
 * @datetime 2025年 1月 08日 15:36
 * @version: 1.0
 */
@Component
public class ContantsProperties implements InitializingBean {



    @Value("${aliyun.sms.regionid}")
    private String regionid;  //区域

    @Value("${aliyun.sms.accesskeyid}")
    private String accesskeyid; //短信的key

    @Value("${aliyun.sms.accesskeyssecret}")
    private String accesskeyssecret; // 短信的密钥

    public static  String REGION_ID;
    public static  String ACCESS_KEY_ID;
    public static  String ACCESSKEY_SSECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        REGION_ID=regionid;
        ACCESS_KEY_ID=accesskeyid;
        ACCESSKEY_SSECRET=accesskeyssecret;
    }
}